package jnpf.service.impl;

import jnpf.entity.*;
import jnpf.mapper.EntityAttributeMapper;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.entity.*;
import jnpf.util.GeneraterSwapUtil;
import jnpf.base.model.ColumnDataModel;
import jnpf.util.UserProvider;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import jnpf.util.*;

/**
 *
 * entity
 * 版本： V3.5
 * 版权： 引迈信息技术有限公司（https://www.jnpfsoft.com）
 * 作者： JNPF开发平台组
 * 日期： 2025-04-10
 */
@Service
public class EntityAttributeServiceImpl extends ServiceImpl<EntityAttributeMapper, EntityAttributeEntity> implements EntityAttributeService{
    @Autowired
    private GeneraterSwapUtil generaterSwapUtil;


    //子表过滤方法
    @Override
    public QueryWrapper<EntityAttributeEntity> getChild(EntityPagination pagination, QueryWrapper<EntityAttributeEntity> entityAttributeQueryWrapper){
    boolean pcPermission = false;
    boolean appPermission = false;
    boolean	isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
    String ruleQueryJson = isPc?EntityConstant.getColumnData():EntityConstant.getAppColumnData();
    ColumnDataModel dataModel = JsonUtil.getJsonToBean(ruleQueryJson,ColumnDataModel.class);
    String ruleJson = isPc?JsonUtil.getObjectToString(dataModel.getRuleList()):JsonUtil.getObjectToString(dataModel.getRuleListApp());
        if(isPc){
        }
        return entityAttributeQueryWrapper;
    }
}
